//
// Description: 841. 字符串哈希
// Created by Loading on 2022/5/14.
//

#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long uLL;
// 数据范围和哈希经验值
constexpr int N = 1e5 + 10, P = 131;

// 哈希数组
uLL h[N], p[N];

// 得到子串 s[l ~ r] 的哈希值，范围：第 l 个到第 r 个，包含 l 和 r
uLL getHash(int l, int r) {
    return h[r] - h[l - 1] * p[r - l + 1];
}

int main() {
    int n, m;
    cin >> n >> m;
    string s;
    cin >> s;
    // 初始化哈希数组
    p[0] = 1;
    for (int i = 1; i <= n; ++i) {
        p[i] = p[i - 1] * P;
        h[i] = h[i - 1] * P + s[i - 1];
    }

    while (m--) {
        int l1, r1, l2, r2;
        cin >> l1 >> r1 >> l2 >> r2;
        if (getHash(l1, r1) == getHash(l2, r2)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }

    return 0;
}